defmodule LibContainer.Macros.OK do
  @moduledoc false

  defmacro ok_pipe(obj, func) do
    quote do
      the_obj = unquote(obj)
      the_func = unquote(func)

      case the_obj do
        {:ok, val} -> the_func.(val)
        others -> others
      end
    end
  end
end
